<?php

namespace app\admin\validate;

use think\Validate;

class Head extends Validate
{
    /**
     * 验证规则
     */
    protected $rule = [
        'password|密码'  => 'require|length:3,20|confirm',
        'password_confirm|确认密码'  => 'require|length:3,20',
        'phone|手机号'     => 'require|unique:head',
        'name|团队名称'     => 'require|unique:head',
    ];

    /**
     * 提示消息
     */
    protected $message = [
    ];
    
    /**
     * 验证场景
     */
    protected $scene = [
        'add'  => ['password','password_confirm','phone','name'],
        'edit' => ['phone','name'],
    ];
    
}
